<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="cdnload" content="vue" />
    <title>暗水印</title>
  </head>
  <style>
    .container {
      max-height: 300px;
      overflow-y: scroll;
    }
  </style>
  <body>
    <div id="app">
      <div>
        <span>选择图片：</span>
        <input type="file" @change="selectFile" />
      </div>
      <div>
        <span>水印内容：</span>
        <input type="text" v-model="text" />
      </div>
      <div>
        <span>添加水印后的图片：</span>
        <div class="container">
          <canvas id="canvas"></canvas>
        </div>
      </div>
      <hr />
      <div>
        <button @click="parseImg">点击解密水印：</button>
        <div class="container">
          <canvas id="canvas-parse"></canvas>
        </div>
      </div>
    </div>
    <script type="module" src="./main.js"></script>
  </body>
</html>
